---
id: "module-deprecated-decorator"
keywords: ["deprecated", "decorator"]
name: "@@deprecated"
summary: "This is the `@@deprecated` decorator."
category: "decorators"
---

The `@@deprecated` decorator is used to add a deprecation note to the file-level of a module. The compiler and editor tooling will yield a warning whenever a deprecated file module is being used.

For more fine-grained control, use the `@deprecated` decorator to add deprecation warnings to specific types, values and submodules.

### Examples

<CodeTab labels={["ReScript", "JS Output"]}>

```res
// Indicate whole module is deprecated
@@deprecated

// Indicate whole module is deprecated, with a comment
@@deprecated("Use OtherModule instead")
```

```js

```

</CodeTab>
